let mongoose = require('mongoose');

let schema = new mongoose.Schema({
    isNovice:{ //是否是新手
        type:Boolean,
        default:true
    }
});


schema.methods={
    receive(options){
        if(this.isNovice){
            let rewards=[{type:1,count:30},{type:2,count:100}];
            options.self.getGoods(rewards);
            this.isNovice=false;
            return rewards;
        }
        return [];
    }
};

module.exports = schema;